<?php

use yii\widgets\ActiveForm;



$this->title = '选择用户和班次';
$this->params['breadcrumbs'][] = ['label' => '排班管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;

?>

<div class="row">
    <div class="col-lg-12">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">选择用户和班次</h3>
            </div>
            <div class="box-body">
                <?php $form = ActiveForm::begin([
                    'fieldConfig' => [
                        'template' => "<div class='col-sm-1 text-right'>{label}</div><div class='col-sm-11'>{input}\n{hint}\n{error}</div>",
                    ],
                ]); ?>
                <div class="col-sm-12">
                    <?= $form->field($model, 'classes_id')->widget(\kartik\select2\Select2::class, [
                        'data' => $classes,
                        'options' => ['placeholder' => '请选择'],
                        'pluginOptions' => [
                            'allowClear' => true
                        ],
                    ]);?>
                    <?= $form->field($model, 'member_id')->widget(\kartik\select2\Select2::class, [
                        'data' => $data,
                        'options' => ['placeholder' => '用户','multiple'=>false,'disabled'=>true],
                        'pluginOptions' => [
                            'allowClear' => true,

                        ],
                    ]);?>
                    <?= $form->field($model, 'check_date')->textarea(['rows'=>20]) ?>

                </div>

                <div class="form-group">
                    <div class="col-sm-12 text-center">
                        <button  class="btn btn-primary" type="submit">保存</button>
                        <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                    </div>
                </div>
                <?php ActiveForm::end(); ?>
            </div>
        </div>
    </div>
</div>
